-r doesn't show with NOSAVE build
This commit is contained in:
parent
93a76e9d2f
commit
a8a7c50691
1 changed files with 14 additions and 8 deletions
14
main.c
14
main.c
|
@ -77,7 +77,14 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
/* Options. */
|
/* Options. */
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "l:or:s")) != EOF) {
|
#ifndef ADVENT_NOSAVE
|
||||||
|
char* opts = "l:or:s";
|
||||||
|
char* usage = "Usage: %s [-l logfilename] [-o] [-r restorefilename] [-s] \n";
|
||||||
|
#else
|
||||||
|
char* opts = "l:os";
|
||||||
|
char* usage = "Usage: %s [-l logfilename] [-o] [-s] \n";
|
||||||
|
#endif
|
||||||
|
while ((ch = getopt(argc, argv, opts)) != EOF) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'l':
|
case 'l':
|
||||||
logfp = fopen(optarg, "w");
|
logfp = fopen(optarg, "w");
|
||||||
|
@ -106,7 +113,7 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: %s [-l logfilename] [-o] [-r restorefilename] [-s] \n", argv[0]);
|
usage, argv[0]);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
" where -l creates a log file of your game named as specified'\n");
|
" where -l creates a log file of your game named as specified'\n");
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
@ -502,8 +509,7 @@ static void croak(void)
|
||||||
* death and exit. */
|
* death and exit. */
|
||||||
RSPEAK(DEATH_CLOSING);
|
RSPEAK(DEATH_CLOSING);
|
||||||
terminate(endgame);
|
terminate(endgame);
|
||||||
}
|
} else if (game.numdie == maximum_deaths || !YES(query, yes_response, arbitrary_messages[OK_MAN]))
|
||||||
else if (game.numdie == maximum_deaths || !YES(query, yes_response, arbitrary_messages[OK_MAN]))
|
|
||||||
terminate(endgame);
|
terminate(endgame);
|
||||||
else {
|
else {
|
||||||
game.place[WATER] = game.place[OIL] = NOWHERE;
|
game.place[WATER] = game.place[OIL] = NOWHERE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue