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