Compare commits
2 commits
62431864c5
...
2c26873cb9
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c26873cb9 | |||
| 9c02d802b1 |
3 changed files with 7 additions and 6 deletions
|
|
@ -65,7 +65,7 @@ int parseArgs(
|
|||
switch( option_index ){
|
||||
case 2: // --version
|
||||
printf( VERSIONSTRING );
|
||||
return 0;
|
||||
return 1;
|
||||
case 6: // --slow-calcWins
|
||||
free( *wins );
|
||||
*wins = NULL;
|
||||
|
|
@ -81,7 +81,6 @@ int parseArgs(
|
|||
long_options[ option_index ].name
|
||||
);
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'h': // --help
|
||||
|
|
@ -99,7 +98,7 @@ int parseArgs(
|
|||
" --slow-calcwins Use the reference implementation of calcWins()\n"
|
||||
" --random-moves Play random moves instead of asking for input\n"
|
||||
);
|
||||
return 0;
|
||||
return 1;
|
||||
case 'l': // --license
|
||||
for(
|
||||
char *p = _binary_LICENSE_start;
|
||||
|
|
@ -108,7 +107,7 @@ int parseArgs(
|
|||
){
|
||||
putchar( *p );
|
||||
}
|
||||
return 0;
|
||||
return 1;
|
||||
case 'c': // --columns
|
||||
board->columns = (columnsint_t)atoi(optarg);
|
||||
break;
|
||||
|
|
@ -126,6 +125,7 @@ int parseArgs(
|
|||
return -1;
|
||||
}
|
||||
break;
|
||||
case '?': return -1;
|
||||
}
|
||||
}
|
||||
// Check for unhandled options
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ int main(
|
|||
&randomMoves
|
||||
)
|
||||
){
|
||||
case -1: return -1;
|
||||
case 0: break;
|
||||
case 1: return 0;
|
||||
default: return -1;
|
||||
|
|
|
|||
2
macros.h
2
macros.h
|
|
@ -8,7 +8,7 @@
|
|||
#define XSTR(s) STR(s)
|
||||
#define STR(s) #s
|
||||
|
||||
#define VERSION 0.3.1
|
||||
#define VERSION 0.3.2
|
||||
|
||||
#ifndef GITHASH
|
||||
#define FULLVERSION VERSION
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue