Unshadowed k2 into k3 in main.c
Reindented everything
This commit is contained in:
parent
5f44fccf4d
commit
bf2fa227f0
7 changed files with 323 additions and 342 deletions
16
cheat.c
16
cheat.c
|
@ -58,9 +58,8 @@ int main(int argc, char *argv[])
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (savefilename == NULL)
|
||||
{
|
||||
|
||||
if (savefilename == NULL) {
|
||||
fprintf(stderr,
|
||||
usage, argv[0]);
|
||||
fprintf(stderr,
|
||||
|
@ -84,21 +83,20 @@ int main(int argc, char *argv[])
|
|||
game.newloc = LOC_START;
|
||||
game.loc = LOC_START;
|
||||
game.limit = GAMELIMIT;
|
||||
|
||||
|
||||
// apply cheats
|
||||
game.numdie = numdie;
|
||||
game.saved = saved;
|
||||
|
||||
|
||||
fp = fopen(savefilename, WRITE_MODE);
|
||||
if (fp == NULL)
|
||||
{
|
||||
if (fp == NULL) {
|
||||
fprintf(stderr,
|
||||
"Can't open file %s. Exiting.\n", savefilename);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
savefile(fp, version);
|
||||
|
||||
|
||||
printf("cheat: %s created.\n", savefilename);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue