fix isl_union_{set,map}_lex_g{e,t}_union_map
[platform/upstream/isl.git] / polytope_scan.c
index dc57cca..269bd81 100644 (file)
@@ -1,7 +1,17 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the GNU LGPLv2.1 license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
 #include <assert.h>
 #include "isl_equalities.h"
 #include "isl_seq.h"
 #include "isl_scan.h"
+#include <isl_mat_private.h>
 
 /* The input of this program is the same as that of the "polytope_scan"
  * program from the barvinok distribution.
@@ -63,6 +73,9 @@ static struct isl_mat *isl_basic_set_samples(struct isl_basic_set *bset)
        struct isl_mat *T;
        struct isl_mat *samples;
 
+       if (!bset)
+               return NULL;
+
        if (bset->n_eq == 0)
                return isl_basic_set_scan_samples(bset);
 
@@ -77,7 +90,7 @@ int main(int argc, char **argv)
        struct isl_basic_set *bset;
        struct isl_mat *samples;
 
-       bset = isl_basic_set_read_from_file(ctx, stdin, 0, ISL_FORMAT_POLYLIB);
+       bset = isl_basic_set_read_from_file(ctx, stdin, 0);
        samples = isl_basic_set_samples(bset);
        isl_mat_dump(samples, stdout, 0);
        isl_mat_free(samples);