[chocolate-doom] 78/83: Remove non-ANSI C headers. Use standard C file I/O functions.

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:06:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.0.1
in repository chocolate-doom.

commit 34a3dfd2803163e92216988a8194c596c61a711f
Author: Simon Howard <fraggle at gmail.com>
Date:   Wed Sep 7 21:30:42 2005 +0000

    Remove non-ANSI C headers. Use standard C file I/O functions.
    
    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 84
---
 src/m_menu.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/m_menu.c b/src/m_menu.c
index 2ec1f39..46f6e27 100644
--- a/src/m_menu.c
+++ b/src/m_menu.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: m_menu.c 66 2005-09-04 14:51:19Z fraggle $
+// $Id: m_menu.c 84 2005-09-07 21:30:42Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.6  2005/09/07 21:30:42  fraggle
+// Remove non-ANSI C headers.  Use standard C file I/O functions.
+//
 // Revision 1.5  2005/09/04 14:51:19  fraggle
 // Display the correct quit messages according to which game is being played.
 // Remove "language" variable (do this through gettext, if ever)
@@ -46,12 +49,8 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: m_menu.c 66 2005-09-04 14:51:19Z fraggle $";
+rcsid[] = "$Id: m_menu.c 84 2005-09-07 21:30:42Z fraggle $";
 
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include <stdlib.h>
 #include <ctype.h>
 
@@ -87,6 +86,7 @@ rcsid[] = "$Id: m_menu.c 66 2005-09-04 14:51:19Z fraggle $";
 #include "m_menu.h"
 
 
+extern void M_QuitDOOM(int);
 
 extern patch_t*		hu_font[HU_FONTSIZE];
 extern boolean		message_dontfuckwithme;
@@ -533,9 +533,9 @@ menu_t  SaveDef =
 //
 void M_ReadSaveStrings(void)
 {
-    int             handle;
-    int             count;
-    int             i;
+    FILE   *handle;
+    int     count;
+    int     i;
     char    name[256];
 	
     for (i = 0;i < load_end;i++)
@@ -545,15 +545,15 @@ void M_ReadSaveStrings(void)
 	else
 	    sprintf(name,SAVEGAMENAME"%d.dsg",i);
 
-	handle = open (name, O_RDONLY | 0, 0666);
-	if (handle == -1)
+	handle = fopen(name, "rb");
+	if (handle == NULL)
 	{
-	    strcpy(&savegamestrings[i][0],EMPTYSTRING);
+	    strcpy(&savegamestrings[i][0], EMPTYSTRING);
 	    LoadMenu[i].status = 0;
 	    continue;
 	}
-	count = read (handle, &savegamestrings[i], SAVESTRINGSIZE);
-	close (handle);
+	count = fread(&savegamestrings[i], 1, SAVESTRINGSIZE, handle);
+	fclose(handle);
 	LoadMenu[i].status = 1;
     }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list