[Scummvm-cvs-logs] SF.net SVN: scummvm:[53958] scummvm/trunk/engines/m4

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Oct 30 23:25:52 CEST 2010


Revision: 53958
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53958&view=rev
Author:   fingolfin
Date:     2010-10-30 21:25:52 +0000 (Sat, 30 Oct 2010)

Log Message:
-----------
M4: Disable code using FILE, fopen, etc. and add explantory FIXME

Modified Paths:
--------------
    scummvm/trunk/engines/m4/console.cpp
    scummvm/trunk/engines/m4/m4.cpp

Modified: scummvm/trunk/engines/m4/console.cpp
===================================================================
--- scummvm/trunk/engines/m4/console.cpp	2010-10-30 21:25:30 UTC (rev 53957)
+++ scummvm/trunk/engines/m4/console.cpp	2010-10-30 21:25:52 UTC (rev 53958)
@@ -321,17 +321,25 @@
 		DebugPrintf("message 'objnum'\n");
 	} else if (!strcmp(argv[1], "list_quotes")) {
 		// Dump the quotes list
+#if 0
+		// FIXME: The following code is not portable and hence has been disabled.
+		// Try replacing FILE by Common::DumpFile.
 		FILE *destFile = fopen("mads_quotes.txt", "wb");
 		for (uint i = 0; i < _vm->globals()->getQuotesSize(); ++i)
 			fprintf(destFile, "%.3d - %s\n", i, _vm->globals()->getQuote(i));
 		fclose(destFile);
+#endif
 
 	} else if (!strcmp(argv[1], "list_vocab")) {
 		// Dump the vocab list
+#if 0
+		// FIXME: The following code is not portable and hence has been disabled.
+		// Try replacing FILE by Common::DumpFile.
 		FILE *destFile = fopen("mads_vocab.txt", "wb");
 		for (uint i = 1; i <= _vm->globals()->getVocabSize(); ++i)
 			fprintf(destFile, "%.3d/%.3x - %s\n", i, i, _vm->globals()->getVocab(i));
 		fclose(destFile);
+#endif
 
 	} else {
 		int messageIdx = strToInt(argv[1]);

Modified: scummvm/trunk/engines/m4/m4.cpp
===================================================================
--- scummvm/trunk/engines/m4/m4.cpp	2010-10-30 21:25:30 UTC (rev 53957)
+++ scummvm/trunk/engines/m4/m4.cpp	2010-10-30 21:25:52 UTC (rev 53958)
@@ -267,6 +267,9 @@
 }
 
 void MadsM4Engine::dumpFile(const char* filename, bool uncompress) {
+#if 0
+	// FIXME: The following code is not portable and hence has been disabled.
+	// Try replacing FILE by Common::DumpFile.
 	Common::SeekableReadStream *fileS = res()->get(filename);
 	byte buffer[256];
 	FILE *destFile = fopen(filename, "wb");
@@ -295,6 +298,7 @@
 	fclose(destFile);
 	res()->toss(filename);
 	res()->purge();
+#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