home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
26fb226
)
Small refactoring for greater readability.
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 21 Aug 2013 17:23:34 +0000
(19:23 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 21 Aug 2013 17:23:34 +0000
(19:23 +0200)
src/misc.c
patch
|
blob
|
history
diff --git
a/src/misc.c
b/src/misc.c
index 711e049db2c067527924aaad8fab26b67ab394f8..ab9963f9af491bc892cb3dce6fdb92582b2b9bb4 100644
(file)
--- a/
src/misc.c
+++ b/
src/misc.c
@@
-135,8
+135,6
@@
extern void turn_over(struct World * world, char action)
extern void save_game(struct World * world)
{
extern void save_game(struct World * world)
{
- char * savefile_tmp = "savefile_tmp";
- char * savefile = "savefile";
char * err_open = "Error saving game: "
"Unable to open 'savefile_new' for writing.";
char * err_write = "Error saving game: "
char * err_open = "Error saving game: "
"Unable to open 'savefile_new' for writing.";
char * err_write = "Error saving game: "
@@
-147,6
+145,8
@@
extern void save_game(struct World * world)
"Unable to unlink old 'savefile'.";
char * err_move = "Error saving game: "
"Unable to rename 'savefile_tmp' to 'savefile'.";
"Unable to unlink old 'savefile'.";
char * err_move = "Error saving game: "
"Unable to rename 'savefile_tmp' to 'savefile'.";
+ char * savefile_tmp = "savefile_tmp";
+ char * savefile = "savefile";
FILE * file = fopen(savefile_tmp, "w");
exit_err(0 == file, world, err_open);
if ( write_uint32_bigendian(world->seed, file)
FILE * file = fopen(savefile_tmp, "w");
exit_err(0 == file, world, err_open);
if ( write_uint32_bigendian(world->seed, file)