178 if (verbose) cout <<
"read data from \'" << name <<
"\'" << endl;
179 std::ifstream is(name.c_str());
185 cout <<
"Bytesex matches" << endl;
188 cout <<
"Magic number found, byte data has to be swapped" << endl;
191 cout <<
"Magic number not found" << endl;
194 cerr <<
"ERROR: illegal return value from " <<
195 "tfxx::ioswap::file_magic_test()" << endl;
205 cout <<
"nval: " << nval << endl;
206 for (
int i=0; i<nval; i++)
210 cout <<
" val1/2: " << val1 <<
", " << val2 << endl;
212 for (
int i=0; i<nval; i++)
216 cout <<
" val: " << val << endl;
220 std::complex<double> dcplx;
221 std::complex<float> scplx;
222 fi >> llint >> lint >> dcplx >> scplx;
223 cout <<
"extra: " << llint <<
", " << lint <<
", " 224 << dcplx <<
", " << scplx << endl;;
Emagic_type file_magic_test(std::istream &is, const char *const cmagic, const bool &fortranmode=false)
Check for magic number in file.
The bytesex of the file matches this machine.
The bytesex of the file must be swapped to match this machine.
Emagic_type
Define bytesex indicator for magic number test.
The magic number does match the file.