X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Farray2dfile.cpp;h=c49e92e87fa8c04d47774e288966f20fa4a195b3;hp=555d22eed1b9c771fdfb92d2e2c37fef87c5094a;hb=58aeefb217c8a59286e629968b2b2902e8b75b99;hpb=c00c639073653fac7463a88f2b000f263236550d diff --git a/libctsim/array2dfile.cpp b/libctsim/array2dfile.cpp index 555d22e..c49e92e 100644 --- a/libctsim/array2dfile.cpp +++ b/libctsim/array2dfile.cpp @@ -7,9 +7,9 @@ ** Date Started: June 2000 ** ** This is part of the CTSim program -** Copyright (C) 1983-2000 Kevin Rosenberg +** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: array2dfile.cpp,v 1.27 2001/01/02 16:02:13 kevin Exp $ +** $Id: array2dfile.cpp,v 1.30 2003/02/02 03:45:10 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -31,6 +31,7 @@ typedef long off_t; #endif +#include const kuint16 Array2dFile::m_signature = ('I'*256+'F'); @@ -358,11 +359,8 @@ Array2dFile::fileRead (const char* const filename) { m_filename = filename; -#ifdef MSVC frnetorderstream fs (m_filename.c_str(), std::ios::out | std::ios::in | std::ios::binary); -#else - frnetorderstream fs (m_filename.c_str(), std::ios::out | std::ios::in | std::ios::binary | std::ios::nocreate); -#endif + if (fs.fail()) { sys_error (ERR_WARNING, "Unable to open file %s [fileRead]", m_filename.c_str()); return false;