remove polyhedron_range
[barvinok.git] / evalue_convert_main.c
blob99ae604fb600ed50418d80db7902e8594f035787
1 #include <barvinok/options.h>
2 #include "evalue_convert.h"
3 #include "evalue_read.h"
5 struct options {
6 struct convert_options *convert;
7 struct barvinok_options *barvinok;
8 };
10 struct isl_arg options_arg[] = {
11 ISL_ARG_CHILD(struct options, convert, NULL, convert_options_arg, NULL)
12 ISL_ARG_CHILD(struct options, barvinok, NULL, barvinok_options_arg, NULL)
13 ISL_ARG_END
16 ISL_ARG_DEF(options, struct options, options_arg)
18 int main(int argc, char **argv)
20 evalue *EP;
21 const char **all_vars = NULL;
22 unsigned nvar;
23 unsigned nparam;
24 struct options *options = options_new_with_defaults();
25 int printed;
27 argc = options_parse(options, argc, argv, ISL_ARG_ALL);
29 EP = evalue_read_from_file(stdin, NULL, &all_vars,
30 &nvar, &nparam, options->barvinok->MaxRays);
31 assert(EP);
33 printed =
34 evalue_convert(EP, options->convert, options->barvinok->verbose,
35 nvar+nparam, all_vars);
37 if (!printed)
38 print_evalue(stdout, EP, all_vars);
40 evalue_free(EP);
41 Free_ParamNames(all_vars, nvar+nparam);
42 options_free(options);