summaryrefslogtreecommitdiff
path: root/src/loadsave.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2011-03-31 17:24:50 +0200
committerBardur Arantsson <bardur@scientician.net>2012-03-29 19:53:56 +0200
commitcc2b0014e4151dd019134cd5b12c9cb3190cd27e (patch)
tree1f28326c0c661b5e026d1eccd4cac78df56fdcbd /src/loadsave.c
parentdac2f1a94d2514137fb409b9a4a3268ac08506d7 (diff)
Files: Remove VERIFY_* load/save compile-time flags.
These flags were either not used or made things more complicated for no good reason.
Diffstat (limited to 'src/loadsave.c')
-rw-r--r--src/loadsave.c103
1 files changed, 0 insertions, 103 deletions
diff --git a/src/loadsave.c b/src/loadsave.c
index 6951628f..7710bc86 100644
--- a/src/loadsave.c
+++ b/src/loadsave.c
@@ -832,17 +832,6 @@ bool_ save_player(void)
/* Hack -- Pretend the character was loaded */
character_loaded = TRUE;
-#ifdef VERIFY_SAVEFILE
-
- /* Lock on savefile */
- strcpy(temp, savefile);
- strcat(temp, ".lok");
-
- /* Remove lock file */
- fd_kill(temp);
-
-#endif
-
/* Success */
result = TRUE;
}
@@ -893,10 +882,6 @@ bool_ load_player(void)
errr err = 0;
-#ifdef VERIFY_TIMESTAMP
- struct stat statbuf;
-#endif /* VERIFY_TIMESTAMP */
-
cptr what = "generic";
/* Paranoia */
@@ -923,50 +908,6 @@ bool_ load_player(void)
return (TRUE);
}
-
-#ifdef VERIFY_SAVEFILE
-
- /* Verify savefile usage */
- if (!err)
- {
- FILE *fkk;
-
- char temp[1024];
-
- /* Extract name of lock file */
- strcpy(temp, savefile);
- strcat(temp, ".lok");
-
- /* Check for lock */
- fkk = my_fopen(temp, "r");
-
- /* Oops, lock exists */
- if (fkk)
- {
- /* Close the file */
- my_fclose(fkk);
-
- /* Message */
- msg_print("Savefile is currently in use.");
- msg_print(NULL);
-
- /* Oops */
- return (FALSE);
- }
-
- /* Create a lock file */
- fkk = my_fopen(temp, "w");
-
- /* Dump a line of info */
- fprintf(fkk, "Lock file for savefile '%s'\n", savefile);
-
- /* Close the lock file */
- my_fclose(fkk);
- }
-
-#endif
-
-
/* Okay */
if (!err)
{
@@ -983,13 +924,6 @@ bool_ load_player(void)
/* Process file */
if (!err)
{
-#ifdef VERIFY_TIMESTAMP
-
- /* Get the timestamp */
- (void)fstat(fd, &statbuf);
-
-#endif
-
/* Open the file XXX XXX XXX XXX Should use Angband file interface */
fff = my_fopen(savefile, "rb");
/* fff = fdopen(fd, "r"); */
@@ -1036,25 +970,6 @@ bool_ load_player(void)
if (err) what = "Broken savefile";
}
-#ifdef VERIFY_TIMESTAMP
-
- /* Verify timestamp */
- if (!err && !arg_wizard)
- {
- /* Hack -- Verify the timestamp */
- if (sf_when > (statbuf.st_ctime + 100) ||
- sf_when < (statbuf.st_ctime - 100))
- {
- /* Message */
- what = "Invalid timestamp";
-
- /* Oops */
- err = -1;
- }
- }
-
-#endif
-
/* Okay */
if (!err)
@@ -1108,24 +1023,6 @@ bool_ load_player(void)
}
-#ifdef VERIFY_SAVEFILE
-
- /* Verify savefile usage */
- if (TRUE)
- {
- char temp[1024];
-
- /* Extract name of lock file */
- strcpy(temp, savefile);
- strcat(temp, ".lok");
-
- /* Remove lock */
- fd_kill(temp);
- }
-
-#endif
-
-
/* Message */
msg_format("Error (%s) reading %d.%d.%d savefile.",
what, sf_major, sf_minor, sf_patch);