Skip to content

Commit

Permalink
Merge pull request #147 from dimpase/printversion
Browse files Browse the repository at this point in the history
msolve -V (and -h) to (also) print version
  • Loading branch information
ederc authored Jul 4, 2024
2 parents a286a83 + 1f05f5f commit 65b3de8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/msolve/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define IO_DEBUG 0

static inline void display_help(char *str){
fprintf(stdout, "\nmsolve library for polynomial system solving\n");
fprintf(stdout, "\nmsolve library for polynomial system solving, version %s\n", VERSION);
fprintf(stdout, "implemented by J. Berthomieu, C. Eder, M. Safey El Din\n");
fprintf(stdout, "\n");
/* fprintf(stdout, "commit hash: %s\n\n", GIT_COMMIT_HASH); */
Expand Down Expand Up @@ -137,6 +137,7 @@ static inline void display_help(char *str){
fprintf(stdout, "-u UHT Number of steps after which the\n");
fprintf(stdout, " hash table is newly generated.\n");
fprintf(stdout, " Default: 0, i.e. no update.\n");
fprintf(stdout, "-V Prints msolve's version\n");
}

static void getoptions(
Expand Down Expand Up @@ -172,7 +173,7 @@ static void getoptions(
char *out_fname = NULL;
char *bin_out_fname = NULL;
opterr = 1;
char options[] = "hf:N:F:v:l:t:e:o:O:u:iI:p:P:q:g:c:s:SCr:R:m:M:n:d:";
char options[] = "hf:N:F:v:l:t:e:o:O:u:iI:p:P:q:g:c:s:SCr:R:m:M:n:d:Vf:";
while((opt = getopt(argc, argv, options)) != -1) {
switch(opt) {
case 'N':
Expand All @@ -181,6 +182,9 @@ static void getoptions(
case 'h':
display_help(argv[0]);
exit(0);
case 'V':
fprintf(stdout, "%s\n", VERSION);
exit(0);
case 'e':
*elim_block_len = strtol(optarg, NULL, 10);
if (*elim_block_len < 0) {
Expand Down

0 comments on commit 65b3de8

Please sign in to comment.