help
Rev | Line | |
---|
[25ae32e] | 1 | #include <stdlib.h> |
---|
| 2 | #include <string.h> |
---|
| 3 | #include "common_guess.h" |
---|
| 4 | |
---|
| 5 | int guess_count=0; |
---|
| 6 | double delta=0.1; |
---|
| 7 | int cut_off=100; |
---|
| 8 | char dictionary[255]; |
---|
| 9 | bool per_info=false; |
---|
| 10 | bool weights=true; |
---|
| 11 | |
---|
| 12 | void process_guess_options(gengetopt_args_info* args) |
---|
| 13 | { |
---|
| 14 | |
---|
| 15 | if(args->dictionary_given) |
---|
| 16 | { |
---|
| 17 | expand_path(args->dictionary_arg,dictionary); |
---|
| 18 | } |
---|
| 19 | else if (args->dictionary_home_given && args->language_given) |
---|
| 20 | { |
---|
| 21 | char buf[255]; |
---|
| 22 | expand_path(args->dictionary_home_arg, buf); |
---|
| 23 | sprintf(dictionary,"%s/%s/lem.bin",buf,args->language_arg); |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | if(args->guess_count_given) |
---|
| 27 | guess_count=args->guess_count_arg; |
---|
| 28 | else |
---|
| 29 | guess_count=0; |
---|
| 30 | |
---|
| 31 | if(guess_count==0) |
---|
| 32 | guess_count=100; |
---|
| 33 | |
---|
| 34 | if(args->delta_given) |
---|
| 35 | delta=args->delta_arg; |
---|
| 36 | else |
---|
| 37 | delta=0.1; |
---|
| 38 | |
---|
| 39 | if(args->cut_off_given) |
---|
| 40 | cut_off=args->cut_off_arg; |
---|
| 41 | else |
---|
| 42 | cut_off=100; |
---|
| 43 | |
---|
| 44 | if(args->per_info_given) |
---|
| 45 | per_info=args->per_info_flag; |
---|
| 46 | |
---|
| 47 | if(args->weights_given) |
---|
| 48 | weights=false; |
---|
| 49 | |
---|
| 50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.