Loading isis/src/base/apps/ddd2isis/ddd2isis.cpp +20 −12 Original line number Diff line number Diff line Loading @@ -13,7 +13,12 @@ void IsisMain() { ProcessImport p; IString from = ui.GetFileName("FROM"); EndianSwapper swp("MSB"); int nsamples = 0, nlines = 0, nbands = 1, noffset = 0, bittype = 0, nbytes = 0; int nsamples = 0; int nlines = 0; int nbands = 1; int noffset = 0; int bittype = 0; int nbytes = 0; union { char readChars[4]; Loading Loading @@ -41,7 +46,8 @@ void IsisMain() { * */ // Verify the magic number // Verify that the file is a .ddd by reading in the first 4 bytes and // comparing the magic numbers readBytes.readLong = 0; fin.seekg(0); fin.read(readBytes.readChars, 4); Loading @@ -52,14 +58,17 @@ void IsisMain() { throw IException(IException::Io, msg, _FILEINFO_); } // Read bytes 4-7 to get number of lines fin.read(readBytes.readChars, 4); readBytes.readFloat = swp.Float(readBytes.readChars); nlines = (int)readBytes.readLong; // Read bytes 8-11 to get number of bytes fin.read(readBytes.readChars, 4); readBytes.readFloat = swp.Float(readBytes.readChars); nbytes = (int)readBytes.readLong; // Read bytes 12-15 to get bittype fin.read(readBytes.readChars, 4); readBytes.readFloat = swp.Float(readBytes.readChars); Loading Loading @@ -123,4 +132,3 @@ void IsisMain() { return; } Loading
isis/src/base/apps/ddd2isis/ddd2isis.cpp +20 −12 Original line number Diff line number Diff line Loading @@ -13,7 +13,12 @@ void IsisMain() { ProcessImport p; IString from = ui.GetFileName("FROM"); EndianSwapper swp("MSB"); int nsamples = 0, nlines = 0, nbands = 1, noffset = 0, bittype = 0, nbytes = 0; int nsamples = 0; int nlines = 0; int nbands = 1; int noffset = 0; int bittype = 0; int nbytes = 0; union { char readChars[4]; Loading Loading @@ -41,7 +46,8 @@ void IsisMain() { * */ // Verify the magic number // Verify that the file is a .ddd by reading in the first 4 bytes and // comparing the magic numbers readBytes.readLong = 0; fin.seekg(0); fin.read(readBytes.readChars, 4); Loading @@ -52,14 +58,17 @@ void IsisMain() { throw IException(IException::Io, msg, _FILEINFO_); } // Read bytes 4-7 to get number of lines fin.read(readBytes.readChars, 4); readBytes.readFloat = swp.Float(readBytes.readChars); nlines = (int)readBytes.readLong; // Read bytes 8-11 to get number of bytes fin.read(readBytes.readChars, 4); readBytes.readFloat = swp.Float(readBytes.readChars); nbytes = (int)readBytes.readLong; // Read bytes 12-15 to get bittype fin.read(readBytes.readChars, 4); readBytes.readFloat = swp.Float(readBytes.readChars); Loading Loading @@ -123,4 +132,3 @@ void IsisMain() { return; }