/*
* 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_seq.h"
+#include <isl_map_private.h>
+#include <isl/seq.h>
#include "isl_tab.h"
struct tab_lp {
return -1;
isl_int_neg(lp->row->el[0], lp->tmp);
- lp->tab = isl_tab_add_eq(lp->tab, lp->row->el);
+ if (isl_tab_add_eq(lp->tab, lp->row->el) < 0)
+ return -1;
isl_seq_cpy(lp->row->el + 1 + lp->dim, row, lp->dim);
isl_seq_clr(lp->row->el + 1, lp->dim);
- lp->tab = isl_tab_add_eq(lp->tab, lp->row->el);
+ if (isl_tab_add_eq(lp->tab, lp->row->el) < 0)
+ return -1;
lp->con_offset += 2;
isl_seq_cpy(lp->row->el + 1, row, lp->dim);
isl_seq_neg(lp->row->el + 1 + lp->dim, row, lp->dim);
- lp->tab = isl_tab_add_valid_eq(lp->tab, lp->row->el);
+ if (isl_tab_add_valid_eq(lp->tab, lp->row->el) < 0)
+ return -1;
return lp->neq++;
}