| 15 | |
| 16 | |
| 17 | int main(int argc, char *argv[]) |
| 18 | { |
| 19 | |
| 20 | // initialize arguments for the Buchberger algorithm |
| 21 | // with default settings |
| 22 | BOOLEAN verbose=FALSE; |
| 23 | short version=1; |
| 24 | short S_pair_criteria=11; |
| 25 | double interreduction_percentage=12.0; |
| 26 | |
| 27 | |
| 28 | ///////////////////////// parse options ///////////////////////////////////// |
| 29 | |
| 30 | short alg_option=0; |
| 31 | // no algorithm specified yet |
| 32 | |
| 33 | if(argc>=2 && strcmp(argv[1],"--help")) |
| 34 | // argc has to be at least 2 |
| 35 | // program name, MATRIX file |
| 36 | { |
| 37 | |
| 38 | for(short i=1;i<argc-1;i++) |
| 39 | // these are the input options |
| 40 | { |
| 41 | |
| 42 | if(!strcmp(argv[i],"-v") || !strcmp(argv[i],"--verbose")) |
| 43 | { |
| 44 | verbose=TRUE; |
| 45 | continue; |
| 46 | // read next argument |
| 47 | } |
| 48 | |
| 49 | if(!strcmp(argv[i],"-V") || !strcmp(argv[i],"-version")) |
| 50 | { |
| 51 | // check if next argument is a valid version number |
| 52 | i++; |
| 53 | |
| 54 | if(!strcmp(argv[i],"1")) |
| 55 | { |
| 56 | version=1; |
| 57 | continue; |
| 58 | } |
| 59 | if(!strcmp(argv[i],"1a")) |
| 60 | { |
| 61 | version=0; |
| 62 | continue; |
| 63 | } |
| 64 | if(!strcmp(argv[i],"2")) |
| 65 | { |
| 66 | version=2; |
| 67 | continue; |
| 68 | } |
| 69 | if(!strcmp(argv[i],"3")) |
| 70 | { |
| 71 | version=3; |
| 72 | continue; |
| 73 | } |
| 74 |
nothing calls this directly
no test coverage detected