X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctsim%2Farray2dfile.cpp;h=3e1662ae1b91ab65ed81f73635efe05c9fe82035;hb=a2bb680d159717dbd81e3ad179cb28adbf3a3e9a;hp=bda792565100e5057cf91924008bc9f81d48953c;hpb=4a5567b8df652cc3168bb9d439bc23f973a2b5ea;p=ctsim.git diff --git a/libctsim/array2dfile.cpp b/libctsim/array2dfile.cpp index bda7925..3e1662a 100644 --- a/libctsim/array2dfile.cpp +++ b/libctsim/array2dfile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: array2dfile.cpp,v 1.28 2001/01/27 21:02:20 kevin Exp $ +** $Id$ ** ** 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;