[Scummvm-cvs-logs] SF.net SVN: scummvm:[34550] scummvm/trunk/backends/fs

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Sep 15 00:44:50 CEST 2008


Revision: 34550
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34550&view=rev
Author:   fingolfin
Date:     2008-09-14 22:44:49 +0000 (Sun, 14 Sep 2008)

Log Message:
-----------
DS: Some more compile fixes (prope solution would of course be to overload ::openForReading & ::openForWriting)

Modified Paths:
--------------
    scummvm/trunk/backends/fs/ds/ds-fs.cpp
    scummvm/trunk/backends/fs/ds/ds-fs.h
    scummvm/trunk/backends/fs/stdiostream.cpp

Modified: scummvm/trunk/backends/fs/ds/ds-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/ds/ds-fs.cpp	2008-09-14 22:28:53 UTC (rev 34549)
+++ scummvm/trunk/backends/fs/ds/ds-fs.cpp	2008-09-14 22:44:49 UTC (rev 34550)
@@ -677,9 +677,10 @@
 	return handle->pos >= handle->size;
 }
 
-void std_fflush(FILE* handle) {
+int std_fflush(FILE* handle) {
 	//FIXME: not implemented?
 //	consolePrintf("fflush ");
+	return 0;
 }
 
 char* std_fgets(char* str, int size, FILE* file) {
@@ -748,6 +749,12 @@
 	return 0;
 }
 
+int std_ferror(FILE* handle) {
+	//FIXME: not implemented?
+//	consolePrintf("ferror ");
+	return 0;
+}
+
 void std_clearerr(FILE* handle) {
 	//FIXME: not implemented?
 //	consolePrintf("clearerr ");
@@ -810,8 +817,4 @@
 	}
 }
 
-int std_ferror(FILE* handle) {
-	return 0;
-}
-
 } // namespace DS

Modified: scummvm/trunk/backends/fs/ds/ds-fs.h
===================================================================
--- scummvm/trunk/backends/fs/ds/ds-fs.h	2008-09-14 22:28:53 UTC (rev 34549)
+++ scummvm/trunk/backends/fs/ds/ds-fs.h	2008-09-14 22:44:49 UTC (rev 34550)
@@ -189,7 +189,8 @@
 int		std_fseek(FILE* handle, long int offset, int whence);
 void	std_clearerr(FILE* handle);
 void	std_cwd(char* dir);
-void	std_fflush(FILE* handle);
+int		std_fflush(FILE* handle);
+int		std_ferror(FILE* handle);
 
 } //namespace DS
 

Modified: scummvm/trunk/backends/fs/stdiostream.cpp
===================================================================
--- scummvm/trunk/backends/fs/stdiostream.cpp	2008-09-14 22:28:53 UTC (rev 34549)
+++ scummvm/trunk/backends/fs/stdiostream.cpp	2008-09-14 22:44:49 UTC (rev 34550)
@@ -59,7 +59,7 @@
 
 #ifdef __DS__
 
-	// These functions replease the standard library functions of the same name.
+	// These functions replace the standard library functions of the same name.
 	// As this header is included after the standard one, I have the chance to #define
 	// all of these to my own code.
 	//
@@ -75,15 +75,6 @@
 	#include "backends/fs/ds/ds-fs.h"
 
 
-	//void	std_fprintf(FILE* handle, const char* fmt, ...);	// used in common/util.cpp
-	//void	std_fflush(FILE* handle);	// used in common/util.cpp
-
-	//char*	std_fgets(char* str, int size, FILE* file);	// not used
-	//int	std_getc(FILE* handle);	// not used
-	//char*	std_getcwd(char* dir, int dunno);	// not used
-	//void	std_cwd(char* dir);	// not used
-	//int	std_ferror(FILE* handle);	// not used
-
 	// Only functions used in the ScummVM source have been defined here!
 	#define fopen(name, mode)					DS::std_fopen(name, mode)
 	#define fclose(handle)						DS::std_fclose(handle)
@@ -93,15 +84,7 @@
 	#define ftell(handle)						DS::std_ftell(handle)
 	#define fseek(handle, offset, whence)		DS::std_fseek(handle, offset, whence)
 	#define clearerr(handle)					DS::std_clearerr(handle)
-
-	//#define printf(fmt, ...)					consolePrintf(fmt, ##__VA_ARGS__)
-
-	//#define fprintf(file, fmt, ...)				{ char str[128]; sprintf(str, fmt, ##__VA_ARGS__); DS::std_fwrite(str, strlen(str), 1, file); }
-	//#define fflush(file)						DS::std_fflush(file)	// used in common/util.cpp
-
-	//#define fgets(str, size, file)				DS::std_fgets(str, size, file)	// not used
-	//#define getc(handle)						DS::std_getc(handle)	// not used
-	//#define getcwd(dir, dunno)					DS::std_getcwd(dir, dunno)	// not used
+	#define fflush(file)						DS::std_fflush(file)
 	#define ferror(handle)						DS::std_ferror(handle)
 
 #endif


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list