Changed the call to ifstream::read to cast the uInt8* image argument as

a char* since GCC 3.0.x doesn't seem to like it as a uInt8*.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@67 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
bwmott 2002-04-10 04:09:59 +00:00
parent f9a2944f56
commit ab1d10bf3a
3 changed files with 10 additions and 10 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: mainDOS.cxx,v 1.4 2002-01-16 15:09:21 stephena Exp $ // $Id: mainDOS.cxx,v 1.5 2002-04-10 04:09:59 bwmott Exp $
//============================================================================ //============================================================================
#include <go32.h> #include <go32.h>
@ -23,10 +23,10 @@
#include <dos.h> #include <dos.h>
#include <pc.h> #include <pc.h>
#include <fstream>
#include <iostream>
#include <strstream>
#include <assert.h> #include <assert.h>
#include <fstream.h>
#include <iostream.h>
#include <strstream.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -679,7 +679,7 @@ int main(int argc, char* argv[])
// Open the cartridge image and read it in // Open the cartridge image and read it in
ifstream in; ifstream in;
in.open(file, ios::in | ios::nocreate | ios::binary); in.open(file, ios::in | ios::binary);
if(!in) if(!in)
{ {
cerr << "ERROR: Couldn't open " << file << "..." << endl; cerr << "ERROR: Couldn't open " << file << "..." << endl;
@ -687,7 +687,7 @@ int main(int argc, char* argv[])
} }
uInt8* image = new uInt8[512 * 1024]; uInt8* image = new uInt8[512 * 1024];
in.read(image, 512 * 1024); in.read((char*)image, 512 * 1024);
uInt32 size = in.gcount(); uInt32 size = in.gcount();
in.close(); in.close();

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: mainSDL.cxx,v 1.19 2002-04-09 16:06:28 stephena Exp $ // $Id: mainSDL.cxx,v 1.20 2002-04-10 04:09:59 bwmott Exp $
//============================================================================ //============================================================================
#include <fstream> #include <fstream>
@ -1344,7 +1344,7 @@ int main(int argc, char* argv[])
} }
uInt8* image = new uInt8[512 * 1024]; uInt8* image = new uInt8[512 * 1024];
in.read(image, 512 * 1024); in.read((char*)image, 512 * 1024);
uInt32 size = in.gcount(); uInt32 size = in.gcount();
in.close(); in.close();

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: mainX11.cxx,v 1.20 2002-04-09 16:06:28 stephena Exp $ // $Id: mainX11.cxx,v 1.21 2002-04-10 04:09:59 bwmott Exp $
//============================================================================ //============================================================================
#include <fstream> #include <fstream>
@ -1243,7 +1243,7 @@ int main(int argc, char* argv[])
} }
uInt8* image = new uInt8[512 * 1024]; uInt8* image = new uInt8[512 * 1024];
in.read(image, 512 * 1024); in.read((char*)image, 512 * 1024);
uInt32 size = in.gcount(); uInt32 size = in.gcount();
in.close(); in.close();