1 #include "evalue_convert.h"
3 static struct argp_option argp_options
[] = {
4 { "convert", 'c', 0, 0, "convert fractionals to periodics" },
5 { "combine", 'C', 0, 0 },
6 { "floor", 'f', 0, 0, "convert fractionals to floorings" },
7 { "range-reduction", 'R', 0, 0 },
11 static error_t
parse_opt(int key
, char *arg
, struct argp_state
*state
)
13 struct convert_options
*options
= state
->input
;
37 return ARGP_ERR_UNKNOWN
;
42 struct argp convert_argp
= {
43 argp_options
, parse_opt
, 0, 0
46 void evalue_convert(evalue
*EP
, struct convert_options
*options
, unsigned nparam
,
52 evalue_range_reduction(EP
);
54 print_evalue(stdout
, EP
, params
);
56 fprintf(stderr
, "WARNING: floor conversion not supported\n");
57 evalue_frac2floor2(EP
, 0);
59 print_evalue(stdout
, EP
, params
);
60 } else if (options
->convert
) {
61 evalue_mod2table(EP
, nparam
);
63 print_evalue(stdout
, EP
, params
);