diff srogue/save.c @ 188:135ec7f15ffe

srogue: remove remnants of deleted savefile checks. save_file() used fstat() and direct write() as part of the inode check which was deleted in f11eeafc. These operations no longer had any effect.
author John "Elwin" Edwards
date Mon, 03 Aug 2015 07:04:48 -0400
parents 233be801aa81
children 3de8058dd549
line wrap: on
line diff
--- a/srogue/save.c	Mon Aug 03 06:42:59 2015 -0400
+++ b/srogue/save.c	Mon Aug 03 07:04:48 2015 -0400
@@ -160,7 +160,6 @@
 save_file(savef)
 FILE *savef;
 {
-	reg int fnum;
 	int slines = LINES;
 	int scols = COLS;
 
@@ -168,20 +167,12 @@
         _djstat_flags |= _STAT_INODE; /* so turn off computing it for now   */
 #endif
 
-	/*
-	 * force allocation of the buffer now so that inodes, etc
-	 * can be checked when restoring saved games.
-	 */
-	fnum = fileno(savef);
-	fstat(fnum, &sbuf);
-	write(fnum, "RDK", 4);
-	lseek(fnum, 0L, 0);
 	encwrite(version,strlen(version)+1,savef);
 	encwrite(&slines,sizeof(slines),savef);
 	encwrite(&scols,sizeof(scols),savef);
 	msg("");
 	rs_save_file(savef);
-	close(fnum);
+	fclose(savef);
 	md_onsignal_exit();
 	wclear(cw);
 	draw(cw);