Skip to content
Snippets Groups Projects
Commit 72165b78 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

corr, proper C++ ifstream usage

parent 5d0caad0
No related branches found
No related tags found
No related merge requests found
......@@ -14,8 +14,8 @@ AM_CXXFLAGS = -g \
-Wsequence-point \
-Wstrict-aliasing -Wswitch \
-Wunknown-pragmas \
-Wmissing-field-initializers \
-Wuninitialized
-Wmissing-field-initializers
# -Wuninitialized
# -Wsign-compare -Wconversion
# the following do not work on u1.spheres.frm2:
......
......@@ -45,9 +45,11 @@ void NFileIn::Load(void)
mystd::fname_divide( vflong[i], &fdir, &fshort, &fext);
if ( fext=="y08" ) {
ifstream F_inpp (vflong[i].c_str(), ios_base::in);
Load_08( F_inpp, vflong[i] );
F_inpp.close();
ifstream f (vflong[i].c_str(), ios_base::in);
if( f.fail() )
throw "cannot open file " + vflong[i];
Load_08( f, vflong[i] );
f.close();
} else if ( fext=="a01" ) {
Load_01( F_in, vflong[i] );
} else if ( fext=="i96" ) {
......
......@@ -107,7 +107,7 @@ int main()
" x execute shell command\n"
" . evaluate expression(s)\n"
" _ special / temporary commands\n"
" / meta commands and macros\n"
" \\? help on meta commands and macros\n"
;
} else if (cmd == "c") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment